#if !defined(AFX_GRADIENTCTRL_H__0588EB4F_1FEA_43DA_84F6_BEC195B8A2F5__INCLUDED_)
#define AFX_GRADIENTCTRL_H__0588EB4F_1FEA_43DA_84F6_BEC195B8A2F5__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// GradientCtrl.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CGradientCtrl window
typedef UINT (CALLBACK* LPFNDLLFUNC1)(HDC,CONST PTRIVERTEX,DWORD,CONST PVOID,DWORD,DWORD);

class CGradientCtrl : public CWnd
{
// Construction
public:
	CGradientCtrl(CPaintDC * pDC, CRect * rt);

// Attributes
public:

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CGradientCtrl)
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CGradientCtrl();

	void SetWindowText(LPCSTR a_lpstr);
	void SetColor(long cl) {m_cUp=cl;};
	void SetGradientColor(long cl) {m_cDown=cl;};
	void SetReverseGradient();
	void SetHorizontalGradient(BOOL a_bVertical = FALSE) { m_bVertical = a_bVertical; };
	void DrawGradRect(COLORREF cLeft, COLORREF cRight, BOOL a_bVertical);
	void SetGradient(COLORREF upColor,COLORREF downColor, BOOL dir=TRUE); // dir ? Vertial : Horizental
	void SetGradient();

	// Generated message map functions
protected:
	//{{AFX_MSG(CGradientCtrl)
		// NOTE - the ClassWizard will add and remove member functions here.
	//}}AFX_MSG

	CDC * m_pDC;
	CRect * m_Rect;

	long m_cUp;
	long m_cDown;
	HINSTANCE hinst_msimg32;
	BOOL m_bCanDoGradientFill;
	BOOL m_bVertical;
	LPFNDLLFUNC1 dllfunc_GradientFill;

	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_GRADIENTCTRL_H__0588EB4F_1FEA_43DA_84F6_BEC195B8A2F5__INCLUDED_)
